<?php

require_once "pay/Wechat/Psr4ClassLoader.php";
use Symfony\Component\ClassLoader\Psr4ClassLoader;

$loader2 = new Psr4ClassLoader();
$loader2->addPrefix('Ry\Methods', ROOT_PATH .'/Ry/Methods');
$loader2->register();

use Ry\Methods\SendRequest;
use Ry\Methods\User;

class api_class
{


    public function __construct() {
        $appKey = "vnroth0kv4oco";
        $appSecret="2hVZ4EhoXdep";
        $format = "json";
        $this->SendRequest = new SendRequest($appKey, $appSecret, $format);
    }

    public function reg_user($id,$name){

        $user = new User($this->SendRequest);
        $result = $user->getToken($id, $name, 'http://www.rongcloud.cn/images/logo.png');
        return $result;
    }


}